<?php

use think\facade\Route;

// 商品 路由
Route::group('goods', function () {
    // 商品管理
    Route::get('goods/activitySelect', 'admin.goods.Goods/activitySelect');


    Route::group(function () {
        // 商品管理

        Route::resource('goods', 'admin.goods.Goods');
        // 服务保障
        Route::resource('service', 'admin.goods.Service');
    })->middleware('check_rule', 'admin');
});


// 积分商城商品路由
Route::group('app/scoreShop', function () {
    // 选择积分商品
    Route::get('select', 'admin.app.ScoreShop/select');

    Route::group(function () {
        // 积分商城
        Route::put(':goods_id', 'admin.app.ScoreShop/edit');
        Route::delete(':goods_id', 'admin.app.ScoreShop/delete');
        Route::get('recyclebin', 'admin.app.ScoreShop/recyclebin');
        Route::get('skuPrices/:goods_id', 'admin.app.ScoreShop/skuPrices');
        Route::get('skus/:goods_id', 'admin.app.ScoreShop/skus');
        Route::put('restore/:goods_id', 'admin.app.ScoreShop/restore');
        Route::delete('destroy/:goods_id', 'admin.app.ScoreShop/destroy');
        Route::resource('', 'admin.app.ScoreShop');
    })->middleware('check_rule', 'admin');
});